<script setup>
import {ref} from 'vue'

const users = ref(false)

const listsUser = ()=>{
  users.value=false
}

const toggleUser = ()=>{
users.value = true
  
}

</script>

<template>
<div>
  <input type="button" value="显示"  @click="toggleUser">
  <input type="button" value="隐藏"  @click="listsUser">
  <p v-show="users">这是一段文字</p>
</div>
</template>

<style scoped>

</style>